//supervisor
const http = require('http')
const url = require('url');
const querystring = require('querystring');
const port = 3000
const mysql = require('mysql');
const connection = mysql.createConnection({
	host: '114.132.199.113',
	user: 'test1',
	password: '123456',
	database: 'test1',
	port: '3939',
	multipleStatements: true
});
connection.connect(err => {
	if (err) throw err;
	console.log('连接成功')
});
var sql = 'CREATE DATABASE RUNOOB';
//查
connection.query(sql, (error, results, fields) => {
    if (error) throw error;
    console.log(results);
});
connection.end();
// const server = http.createServer((req, res) => {
	// res.writeHead(200, {
	// 	'Content-Type': 'text/plain'
	// });

	// req.on('data', function(chunk) {
	// 	res.write(chunk);
	// 	console.log(chunk.toString())
	// });

	// req.on('end', function() {
	// 	res.end();
	// });
// })

// server.listen(port, () => {
// 	console.log(`服务器运行`)
// })
